#ifndef __COMMON_H__
#define __COMMON_H__
#include <hash_map>
using std::hash_map;

#include "cocos2d.h"
#include "cocos-ext.h"

USING_NS_CC;
USING_NS_CC_EXT;

#define PTM_RATIO 32

#define checkTouchEventTypeIsEnd(eType) \
if (eType != TouchEventType::TOUCH_EVENT_ENDED) \
{ \
	return; \
}

#define registerTouchEvent(Class, btnTag) \
{	\
	UIWidget* p = UIHelper::seekWidgetByTag(pRoot, btnTag);	\
	CC_BREAK_IF(!p);	\
	p->addTouchEventListener(this, toucheventselector(Class::on_##btnTag));	\
}

enum ECollisionMask
{
	ECM_Group = 1 << 1,
	ECM_GroupLeftAndRightAndTop = 1 << 2,
	ECM_Hero = 1 << 3,
	ECM_Enemy = 1 << 4,
	ECM_Step = 1 << 5,
};

enum EGameSpriteType
{
	EGS_Hero,
	EGS_Enemy,
	EGS_Step
};

enum EGameSpriteStatus
{
	EGSS_move,
	EGSS_Jump,
	EGSS_dead,
};

enum EEnemy
{
	
	EE_tank = 0,
	EE_Plane ,
	EE_machine,
	EE_jetfire,
	EE_obstacle,
	EE_shell,
	EE_cnt
};

extern const char* gEnemyModel[EE_cnt];

#endif